home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / PCICommonPlugin.p < prev    next >
Text File  |  1996-05-01  |  3KB  |  129 lines

  1. {
  2.      File:        PCICommonPlugin.p
  3.  
  4.      Contains:    This file contains all interface related structures and prototypes common for pci expert to
  5.  
  6.      Version:    Technology:    Copland
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT PCICommonPlugin;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __PCICOMMONPLUGIN__}
  28. {$SETC __PCICOMMONPLUGIN__ := 1}
  29.  
  30. {$I+}
  31. {$SETC PCICommonPluginIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __NAMEREGISTRY__}
  38. {$I NameRegistry.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __ERRORS__}
  41. {$I Errors.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __DRIVERFAMILYMATCHING__}
  44. {$I DriverFamilyMatching.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __INTERRUPTS__}
  47. {$I Interrupts.p}
  48. {$ENDC}
  49.  
  50. {$PUSH}
  51. {$ALIGN MAC68K}
  52. {$LibExport+}
  53.  
  54. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  55. {  typedefs for common plugins interface }
  56.  
  57. TYPE
  58.     DefaultEnablerFuncPtr = ProcPtr;  { PROCEDURE DefaultEnablerFuncPtr(setIDMember: InterruptSetMember; refCon: UNIV Ptr); C; }
  59.  
  60.     DefaultDisablerFuncPtr = ProcPtr;  { FUNCTION DefaultDisablerFuncPtr(setIDMember: InterruptSetMember; refCon: UNIV Ptr): ByteParameter; C; }
  61.  
  62.     DefaultDispatcherFuncPtr = ProcPtr;  { FUNCTION DefaultDispatcherFuncPtr(setIDMember: InterruptSetMember; info: UNIV Ptr; theIntCount: UInt32): InterruptMemberNumber; C; }
  63.  
  64.     InitializeFuncPtr = ProcPtr;  { FUNCTION InitializeFuncPtr: OSStatus; C; }
  65.  
  66.     FinalizeFuncPtr = ProcPtr;  { FUNCTION FinalizeFuncPtr: OSStatus; C; }
  67.  
  68.     PCIPluginHeaderPtr = ^PCIPluginHeader;
  69.     PCIPluginHeader = RECORD
  70.         version:                UInt32;
  71.         reserved1:                UInt32;
  72.         reserved2:                UInt32;
  73.         reserved3:                UInt32;
  74.         thisPluginLoadID:        PluginLoadID;
  75.     END;
  76.  
  77. {  pci bridge descriptor definition }
  78.     PCIBridgeDescriptorPtr = ^PCIBridgeDescriptor;
  79.     PCIBridgeDescriptor = RECORD
  80.         InterfaceHeader:        PCIPluginHeader;
  81.         TheDomainDriverDescription: DriverDescriptionPtr;
  82.         DefaultBridgeEnablerFunc: DefaultEnablerFuncPtr;
  83.         DefaultBridgeDisablerFunc: DefaultDisablerFuncPtr;
  84.         DefaultBridgeDispatcherFunc: DefaultDispatcherFuncPtr;
  85.         FinalizeFunc:            FinalizeFuncPtr;
  86.     END;
  87.  
  88. {
  89.  pci bridge variables for bridges
  90.     stolen from marconi InterruptsAssign.c written by Matt Nelson
  91. }
  92.     DefaultBridgeVariablesPtr = ^DefaultBridgeVariables;
  93.     DefaultBridgeVariables = RECORD
  94.         lastEntryIntCount:        UInt32;
  95.         lastServicedMember:        InterruptMemberNumber;
  96.         totalMembersScanned:    UInt32;
  97.         totalMemberCount:        UInt32;
  98.         memberEnableFlags:        Ptr;
  99.     END;
  100.  
  101. {  pci header interface version definition }
  102.  
  103. CONST
  104.     kPCIPluginVersion1000        = $01000000;                    {  initial pci family interface release }
  105.  
  106. {  pci error codes }
  107.     kPCIerrorNoError            = 0;
  108.     kPCIerrorNoDeviceFound        = -2538;
  109.     kPCIerrorNoDomainFound        = -192;
  110.     kPCIerrorBadPointerFound    = -346;
  111.     kPCIerrorBadValueFound        = -2422;
  112.     kPCIerrorBadRegPropertyFound = -2539;
  113.     kPCIerrorNoNotificationProduced = -192;
  114.     kPCIerrorMemoryAllocationFailed = -2537;
  115.     kPCIerrorUnsupportedPluginVersion = -2405;
  116.     kPCIerrorFatal                = -2499;
  117.  
  118. {$ENDC}
  119. {$ALIGN RESET}
  120. {$POP}
  121.  
  122. {$SETC UsingIncludes := PCICommonPluginIncludes}
  123.  
  124. {$ENDC} {__PCICOMMONPLUGIN__}
  125.  
  126. {$IFC NOT UsingIncludes}
  127.  END.
  128. {$ENDC}
  129.